package com.hong.collections.concurrent;

import java.util.concurrent.ConcurrentLinkedQueue;

/**
 * @Author csh
 * @Description
 * @Date 2018/8/20 19:06
 */
public class ConcurrentLinkedQueueExample {
    public static void main(String[] args) {
        ConcurrentLinkedQueue<Long> queue = new ConcurrentLinkedQueue<>();

        for (int i = 0;i<100000;i++){
            queue.offer(System.nanoTime());
        }

        System.out.println("=========offer done========");
        long startTIme = System.currentTimeMillis();
        while (queue.size()>0){
            System.out.println(queue.poll());
        }
        System.out.println(System.currentTimeMillis() - startTIme);

    }

    private static void handleText(String s){
        if(null!=s && !"".equals(s)){

        }

        if(null!=s && s.length()>0){

        }
    }
}
